﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Web
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            #region LoginController

            routes.MapRoute("login.html", "login.html", new { controller = "Login", action = "Index" });
            routes.MapRoute("logined.html", "logined.html", new { controller = "Login", action = "Logined" });
            routes.MapRoute("authorize.html", "authorize.html", new { controller = "Login", action = "Authorize" });
            

            #endregion

            #region RoleController

            routes.MapRoute("roles.html", "roles.html", new { controller = "Role", action = "Index" });
            routes.MapRoute("getRoles.html", "getRoles.html", new { controller = "Role", action = "GetRoles" });
            routes.MapRoute("editRole.html", "editRole.html", new { controller = "Role", action = "Edit" });
            routes.MapRoute("setRole.html", "setRole.html", new { controller = "Role", action = "Set" });
            routes.MapRoute("getPermissions.html", "getPermissions.html", new { controller = "Role", action = "GetPermissions" });

            #endregion

            #region AgencyUserController

            routes.MapRoute("AgencyUsers.html", "AgencyUsers.html", new { controller = "AgencyUser", action = "Index" });
            routes.MapRoute("getAgencyUsers.html", "getAgencyUsers.html", new { controller = "AgencyUser", action = "getAgencyUsers" });
            routes.MapRoute("editAgencyUser.html", "editAgencyUser.html", new { controller = "AgencyUser", action = "EditAgencyUser" });
            routes.MapRoute("editedAgencyUser.html", "editedAgencyUser.html", new { controller = "AgencyUser", action = "EditedAgencyUser" });
            routes.MapRoute("setAgencyUser.html", "setAgencyUser.html", new { controller = "AgencyUser", action = "SetAgencyUser" });
            routes.MapRoute("robotAgencyUser.html", "robotAgencyUser.html", new { controller = "AgencyUser", action = "RobotAgencyUser" });
            routes.MapRoute("UpdatePid.html", "UpdatePid.html", new { controller = "AgencyUser", action = "UpdatePid" });
              
            #endregion

            #region AgencyRobot
            routes.MapRoute("AgencyRobot.html", "AgencyRobot.html", new { controller = "AgencyRobot", action = "Index" });

            routes.MapRoute("editAgencyRobot.html", "editAgencyRobot.html", new { controller = "AgencyRobot", action = "Edit" });

            routes.MapRoute("getAgencyRobots.html", "getAgencyRobots.html", new { controller = "AgencyRobot", action = "getAgencyRobots" });


            routes.MapRoute("deleteAgencyRobot.html", "deleteAgencyRobot.html", new { controller = "AgencyRobot", action = "Delete" });

            #endregion

            #region AlimamaController

            routes.MapRoute("alimamas.html", "alimamas.html", new { controller = "Alimama", action = "Index" });
            routes.MapRoute("getAlimamas.html", "getAlimamas.html", new { controller = "Alimama", action = "GetAlimamas" });
            routes.MapRoute("editAlimama.html", "editAlimama.html", new { controller = "Alimama", action = "Edit" });
            routes.MapRoute("editedAlimama.html", "editedAlimama.html", new { controller = "Alimama", action = "Edited" });
             
            #endregion

            #region ProductController

            routes.MapRoute("goods.html", "goods.html", new { controller = "Product", action = "Index" });
            routes.MapRoute("getProducts.html", "getProducts.html", new { controller = "Product", action = "GetProducts" });
            routes.MapRoute("mygoods.html", "mygoods.html", new { controller = "Product", action = "mygoods" });
            #endregion

            #region RobotController

            routes.MapRoute("editRobot.html", "editRobot.html", new { controller = "Robot", action = "Edit" });
            routes.MapRoute("robots.html", "robots.html", new { controller = "Robot", action = "Index" });
            routes.MapRoute("getrobots.html", "getRobots.html", new { controller = "Robot", action = "GetRobots" });
            routes.MapRoute("generate.html", "generate.html", new { controller = "Robot", action = "Generate" });

            routes.MapRoute("regRobot.html", "regRobot.html", new { controller = "Robot", action = "regRobot" });
            

            #endregion

            #region NTbkOrderController

            routes.MapRoute("ntbkorders.html", "ntbkorders.html", new { controller = "NTbkOrder", action = "Index" });
            routes.MapRoute("getntbkorders.html", "getntbkorders.html", new { controller = "NTbkOrder", action = "GetNTbkOrders" });

            #endregion

            #region TbkOrderController

            routes.MapRoute("tbkorders.html", "tbkorders.html", new { controller = "TbkOrder", action = "index" });
            routes.MapRoute("getTbkOrders.html", "getTbkOrders.html", new { controller = "TbkOrder", action = "GetTbkOrders" });

            #endregion

            #region SysConfigController

            routes.MapRoute("sysConfigs.html", "sysConfigs.html", new { controller = "SysConfig", action = "Index" });
            routes.MapRoute("getSysConfigs.html", "getSysConfigs.html", new { controller = "SysConfig", action = "GetSysConfigs" });
            routes.MapRoute("editSysConfig.html", "editSysConfig.html", new { controller = "SysConfig", action = "Edit" }); 

            #endregion

            #region StatisticController

            routes.MapRoute("statistic.html", "statistic.html", new { controller = "Statistic", action = "Index" });
            routes.MapRoute("RecentPerformancePromotion.html", "RecentPerformancePromotion.html", new { controller = "Statistic", action = "RecentPerformancePromotion" });
            routes.MapRoute("TaobaoOrderNumber.html", "TaobaoOrderNumber.html", new { controller = "Statistic", action = "TaobaoOrderNumber" });
            routes.MapRoute("TaobaoOrderView.html", "TaobaoOrderView.html", new { controller = "Statistic", action = "TaobaoOrderView" });
            routes.MapRoute("ExtendedLinkTransformation.html", "ExtendedLinkTransformation.html", new { controller = "Statistic", action = "ExtendedLinkTransformation" });
            routes.MapRoute("PersonalPromotionDetails.html", "PersonalPromotionDetails.html", new { controller = "Statistic", action = "PersonalPromotionDetails" });
            routes.MapRoute("PersonalPromotionStatistics.html", "PersonalPromotionStatistics.html", new { controller = "Statistic", action = "PersonalPromotionStatistics" });
            routes.MapRoute("AgentExtensionAnalysis.html", "AgentExtensionAnalysis.html", new { controller = "Statistic", action = "AgentExtensionAnalysis" });
            routes.MapRoute("AgencyPromotionStatistics.html", "AgencyPromotionStatistics.html", new { controller = "Statistic", action = "AgencyPromotionStatistics" });
            routes.MapRoute("PromotionIncomeAnalysis.html", "PromotionIncomeAnalysis.html", new { controller = "Statistic", action = "PromotionIncomeAnalysis" });

            #endregion

            #region TbkItemController

            routes.MapRoute("tbkItems.html", "tbkItems.html", new { controller = "TbkItem", action = "Index" });
            routes.MapRoute("getTbkItems.html", "getTbkItems.html", new { controller = "TbkItem", action = "GetTbkItems" });

            #endregion

            

            routes.MapRoute("index.html", "index.html", new { controller = "Home", action = "Index" });
            routes.MapRoute("list.html", "list.html", new { controller = "Home", action = "List" });
            routes.MapRoute("form.html", "form.html", new { controller = "Home", action = "Form" });
            routes.MapRoute("survey.html", "survey.html", new { controller = "Home", action = "survey" });

            routes.MapRoute(null, "message.html", new { controller = "Role", action = "Message" });
            routes.MapRoute(null, "ConventLink.html", new { controller = "Role", action = "ConventLink" });
            routes.MapRoute(null, "getSearchKeyList.html", new { controller = "Role", action = "getSearchKeyList" });
            routes.MapRoute(null, "SearchKeyWord.html", new { controller = "Role", action = "SearchKeyWord" });
            routes.MapRoute(null, "Tag.html", new { controller = "Role", action = "Tag" });
            routes.MapRoute(null, "Tagadd.html", new { controller = "Role", action = "Tagadd" });
            


            routes.MapRoute(null, "GetIncome.html", new { controller = "Statistic", action = "GetIncome" });
            routes.MapRoute(null, "Income.html", new { controller = "Statistic", action = "IncomeList" });
            routes.MapRoute(null, "IncomeStat.html", new { controller = "Statistic", action = "IncomeStatList" });
            routes.MapRoute(null, "getIncomeStat.html", new { controller = "Statistic", action = "getIncomeStat" });
            routes.MapRoute(null, "GetPayIncome.html", new { controller = "Statistic", action = "GetPayIncome" });
            routes.MapRoute(null, "PayAnalysis.html", new { controller = "Statistic", action = "PayAnalysis" });
            routes.MapRoute(null, "GetUserExtension.html", new { controller = "Statistic", action = "GetUserExtension" });
             routes.MapRoute(null, "pwd.html", new { controller = "Role", action = "PasswordEdit" });
             routes.MapRoute(null, "loginout.html", new { controller = "Login", action = "loginout" });
           
           
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}
